home *** CD-ROM | disk | FTP | other *** search
- property pMemberNormal, pMemberRollover, gowhere, soundMember, soundChannel, loops, pCursorChange, pCursorChoice, pSpriteMember
-
- on getBehaviorDescription me
- return "Rollover, Sound and goto Marker" & RETURN & RETURN & "Just add to Sprite and fill-in Properties"
- end
-
- on getBehaviorTooltip me
- return "Use with any sprite member."
- end
-
- on getPropertyDescriptionList me
- xlist = [:]
- addProp(xlist, #gowhere, [#comment: "Navigate Where?", #format: #marker, #default: #bitmap])
- addProp(xlist, #soundMember, [#comment: "Sound to play", #format: #sound, #default: VOID])
- addProp(xlist, #soundChannel, [#comment: "Sound channel", #format: #integer, #default: 3, #range: [2, 3, 4]])
- addProp(xlist, #loops, [#comment: "How many loops:", #format: #integer, #default: 1, #range: [1, 2, 3, 4, 5, 6, 7, 8]])
- addProp(xlist, #pCursorChoice, [#default: 1, #format: #boolean, #comment: "Do you want a cursor change?"])
- addProp(xlist, #pCursorChange, [#format: #cursor, #comment: "Please choose cursor", #default: 280])
- addProp(xlist, #pSpriteMember, [#comment: "Type in which sprite number will roll:", #format: #integer, #default: VOID])
- return xlist
- end
-
- on spriteRoll
- rollSprite = pSpriteMember
- if rollSprite > 0 then
- sprite(rollSprite).memberNum = sprite(rollSprite).memberNum + 1
- else
- nothing()
- end if
- end
-
- on spriteLeave
- unrollSprite = pSpriteMember
- if unrollSprite > 0 then
- sprite(unrollSprite).memberNum = sprite(unrollSprite).memberNum - 1
- else
- nothing()
- end if
- end
-
- on changeCur
- if pCursorChoice = 1 then
- cursor(pCursorChange)
- else
- cursor(0)
- end if
- end
-
- on playMySound me
- soundStatus = sound(soundChannel)
- if soundStatus = 4 then
- sound(soundChannel).play()
- else
- sound(soundChannel).play([#member: soundMember, #loopCount: loops])
- end if
- end
-
- on mouseUp me
- playMySound()
- go(gowhere)
- cursor(0)
- end
-
- on mouseEnter me
- spriteRoll()
- changeCur()
- end
-
- on mouseLeave me
- spriteLeave()
- cursor(0)
- end
-